use crate::core::entity::jump_url::JumpUrl;
use crate::core::entity::resource_url::ResourceUrl;
use serde::{Deserialize, Serialize};
use share::core::channel::Channel;
use share::core::native_version::NativeVersion;
use share::core::resource_version::ResourceVersion;
use std::net::IpAddr;

/// 客户端热更新需要相关信息
#[derive(Serialize, Deserialize)]
pub struct GetUpdateInfoResponse {
    pub channel: Channel,
    pub min_native_version: NativeVersion,
    pub latest_native_version: NativeVersion,
    pub jump_url: JumpUrl,
    pub raw_resource_version: Option<ResourceVersion>,
    pub default_resource_version: Option<ResourceVersion>,
    pub resource_url: Option<ResourceUrl>,
}

#[derive(Serialize, Deserialize)]
pub struct GetInnerIpResponse {
    pub ip: Option<IpAddr>,
}
